<%@ page pageEncoding="UTF-8"%>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<p>已将cookie删除：</p>
<%
    //JSP将请求默认是使用ISO-8859-1，而大多数浏览器都是以UTF-8编码发送请求数据.所以，如果不设置编码，那么就会导致乱码。
    request.setCharacterEncoding("UTF-8");

    Cookie cookie = new Cookie( "name", "" );
    cookie.setMaxAge( 0 );
    response.addCookie(cookie);  //将该空cookie对象存入response才能生效
%>
</body>
</html>